package com.mazihao.emos.controller;

import com.mazihao.emos.common.util.AjaxResult;
import com.mazihao.emos.controller.form.TestSayHelloForm;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@RestController
@RequestMapping("/test")
@Api("测试Web接口")
public class TestController {
    @PostMapping("/sayHello")
    @ApiOperation("测试接口")
    public AjaxResult sayHello(@Valid @RequestBody TestSayHelloForm form){
        return AjaxResult.ok().put("msg", "Hello,"+form.getName());
    }

}
